/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.transportes.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import pe.com.transportes.modelo.Zonabus;

/**
 *
 * @author z3phiroth
 */
public class ZonabusDAO {


          public void insertarzona(Connection con,Zonabus z) throws SQLException{

    String sql ="insert into zonabus values (?,?,?,?)";
    PreparedStatement ps = con.prepareStatement(sql);


    System.out.println("codigo dao "+z.getCod_zona());

    ps.setInt(1,z.getCod_zona());
    ps.setString(2,z.getTipo());
    ps.setString(3, z.getDescripcion());
    ps.setDouble(4, z.getCostoadicional());
    ps.executeUpdate();
    }












}
